﻿@model IList<Entidad.Proveedor>
@{
    ViewBag.Title = "Proveedores Registrados";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Proveedores Registrados</h2>
@*<div id="container" class="row-fluid">
    <!-- BEGIN PAGE -->
    <div id="main-content">
        <!-- BEGIN PAGE CONTAINER-->
        <div class="container-fluid">

            <!-- BEGIN PAGE HEADER-->
            <!-- END PAGE HEADER-->*@
            
            <!-- ******CONTENT BODY GOES HERE*******  -->
            <div class="widget-body">
                <div>
                    @using (Html.BeginForm("Crear", "Proveedor", FormMethod.Get))
                    {
                        <div class="form-group">
                            <div class="col-md-offset-2 col-md-10">
                                <input type="submit" value="Nuevo Proveedor" class="btn btn-default" />
                            </div>
                        </div>
                    }
                </div>
            </div>
            <div class="span12">
                <!-- BEGIN BASIC CHART PORTLET-->
                <div class="widget black">
                    <div class="widget-title">
                        <h4><i class="icon-user-md"></i> Proveedores Registrados</h4>
                        <span class="tools">
                            <a href="javascript:;" class="icon-chevron-down"></a>
                            <a href="javascript:;" class="icon-remove"></a>
                        </span>
                    </div>
                    <div class="widget-body">

                        @using (Html.BeginForm("FindByRazonSocial", "Proveedor", FormMethod.Post))
                        {
                            <p>
                                Razón Social: @Html.TextBox("razonsocial")
                                <input id="Filtrar" type="submit" value="Buscar Proveedor" class="btn btn-default" /> 
                            </p> 
                                

                            <div id="grid-list">
                                @{ Html.RenderPartial("ListadoPartial", Model); }
                            </div>

                        }
                    </div>
                </div>
                <!-- END BASIC CHART PORTLET-->
            </div>
            <!-- END PAGE CONTENT-->
        @*</div>
        <!-- END PAGE CONTAINER-->
    </div>
    <!-- END PAGE -->
</div>
<!-- END CONTAINER -->*@


    <script type="text/javascript" >
    $(document).ready(function() {
        $.get("@Url.Action("ListadoPartial", "Proveedor")", function (data) {
            $('#grid-list').replaceWith(data);
        });
    });
    </script>

